<template>
	<view>
		<!-- <view class="pj_box"> -->
			<view class="pj_box" v-if="dataList.length != 0 ">
			<view class="pj_tlt">
				<view>宝贝评价（{{dataList.length}}）</view>
			</view>
			<view class="cc" v-for="item in dataList">
				<view class="pj_per">
					<image :src="item.head_image" mode=""></image>
					<view class="pj_a">
						<view>{{item.member_nickname}}</view>
						<view>{{item.add_time}}</view>
					</view>
				</view>
				<view class="">
					<view class="pjnr">
						{{item.value}}
					</view>
					<view class="imgpj">
						<image :src="JSON.parse(item.image)[0].img" mode=""></image>
					</view>
				</view>
			</view>
		</view>
		
		<view class="" v-else style="margin-top: 20upx; text-align: center;">
			暂无评论!
		</view>
	</view>
</template>

<script>
	var app = getApp();
	export default {
		data() {
			return {
				dataList:[]
			}
		},
		onLoad(option) {
			app.globalData.util.request({
				url: "entry/wxapp/Api",
				data: {
					m: "monai_market",
					r: "goods.index.commentlist",
					goods_id:option.id
				},
				success: res => {
					console.log(res);
					this.dataList = res.data.data
					console.log(res.data.data);
				}
			});	
		},
		methods: {
			
		}
	}
</script>

<style>
.cc{
	border-bottom: 2upx solid #F2F2F2;
}
.pj_box{
	padding: 43upx 31upx 32upx 31upx;
	box-sizing: border-box;
}
.pj_tlt{
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 36upx;
}
.pj_tlt view:nth-child(1){
	font-size: 32upx;
	font-weight: 600;
	color: #0F0F0F;
}
.pj_tlt view:nth-child(2){
	font-size: 26upx;
	font-weight: 500;
	color: #F25D15;
}
.pj_per{
	display: flex;
	align-items: center;
	margin-bottom: 30upx;
	padding-top: 20rpx;
}
.pj_per image{
	width: 57upx;
	height: 57upx;
	background: #FB8408;
	border-radius: 50%;
	margin-right: 19upx;
}
.pj_a view:nth-child(1){
	font-size: 28upx;
	font-weight: 400;
	color: #323232;
	margin-bottom: 4upx;
}
.pj_a view:nth-child(2){
	font-size: 22upx;
	font-weight: 500;
	color: #838282;
}
.pjnr{
	font-size: 28upx;
	font-family: Microsoft YaHei;
	font-weight: 400;
	color: #333333;
	margin-bottom: 20upx;
}
.imgpj{
	padding-bottom: 20upx;
}
.imgpj image{
	width: 222upx;
	height: 222upx;
	border-radius: 10upx;
}
</style>
